<template>
  <el-form-item label="航班号">
    <el-select
      v-model="flightNo"
      clearable
      placeholder="请选择航班号"
      @change="change"
    >
      <el-option
        v-for="item in airlinesCode"
        :key="item"
        :label="item"
        :value="item"
      >
      </el-option>
    </el-select>
  </el-form-item>
</template>

<script>
import { defineComponent, ref, compute } from 'vue';
export default defineComponent({
  name: 'FlightNoPicker',
  props: {
    flightId: {
      type: String,
    },
  },
  setup(props, context) {
    const airlinesCode = ref(['MU']);
    const flightNo = ref('');
    const change = () => {
      context.emit('update:flightId', flightNo.value);
    };
    return {
      airlinesCode,
      flightNo,
      change,
    };
  },
});
</script>

<style lang="scss" scoped>
@import '@/assets/css/config.scss';
</style>
